﻿/*
 * This software is the confidential and proprietary
 * information of NetBay
 * Such confidential information should not be disclosed
 * NetBay copyright(c) 2010
 */

#region Using
using System;
using Rio.Framework.WCFService.RioWcfServices;
#endregion

namespace Rio.Framework.WCFService
{
    public class ProgressEventArgs : EventArgs
    {
        #region Attributes
        /// <summary>
        /// Percentage of done job
        /// </summary>
        private readonly int m_iPercentageDone;
        /// <summary>
        /// Error message if any
        /// </summary>
        private readonly string m_szErrorMessage;

        private ImageRio m_oThumbNail;
        #endregion

        #region Properties
        /// <summary>
        /// Percentage of done job
        /// </summary>
        public int PercentageDone
        {
            get { return m_iPercentageDone; }
        }
        /// <summary>
        /// Error message if any
        /// </summary>
        public string ErrorMessage
        {
            get { return m_szErrorMessage; }
        }
        #endregion

        #region Constructors
        /// <summary>
        /// Default constructor
        /// </summary>
        public ProgressEventArgs()
            : this(0, string.Empty, null)
        {
        }
        /// <summary>
        /// Rich constructor
        /// </summary>
        /// <param name="p_iPercentageDone">Percentage of done job</param>
        /// <param name="p_szErrorMessage">Error message if any</param>
        public ProgressEventArgs(int p_iPercentageDone, string p_szErrorMessage, ImageRio p_oThumbNail)
        {
            m_iPercentageDone = p_iPercentageDone;
            m_szErrorMessage = p_szErrorMessage;
            m_oThumbNail = p_oThumbNail;
        }
        #endregion

        #region Static
        /// <summary>
        /// A empty ProgressEventArgs
        /// </summary>
        public new static ProgressEventArgs Empty = new ProgressEventArgs();
        #endregion

    }
}
